package com.ehotting.edsta.system.api.factory;

import com.ehotting.eaf.core.web.domain.AjaxResult;
import com.ehotting.edsta.system.api.RemoteExpertService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * 专家系统服务降级处理
 * 
 * @author edsta
 */
@Component
public class RemoteExpertFallbackFactory implements FallbackFactory<RemoteExpertService>
{
    private static final Logger log = LoggerFactory.getLogger(RemoteExpertFallbackFactory.class);

    @Override
    public RemoteExpertService create(Throwable throwable)
    {
        return (sceneId, ruleId, params) -> AjaxResult.error();
    }
}
